-
Notifications
You must be signed in to change notification settings - Fork 58
[WIP] Adding MultiAgent Utilities #323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
This pull request introduces 1 alert when merging 0927001 into c3ef4d9 - view on LGTM.com new alerts:
|
|
Looks pretty good. |
|
This pull request introduces 2 alerts when merging daa8b2a into c3ef4d9 - view on LGTM.com new alerts:
|
|
This pull request introduces 2 alerts when merging 44db72e into c3ef4d9 - view on LGTM.com new alerts:
|
|
This pull request introduces 2 alerts when merging d8cf1a9 into c3ef4d9 - view on LGTM.com new alerts:
|
|
This pull request introduces 5 alerts when merging 1365585 into c3ef4d9 - view on LGTM.com new alerts:
|
| self.env.close() | ||
|
|
||
|
|
||
| class MultiGymWrapper(gym.Wrapper): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whats the difference between this and a normal Wrapper? Cant you use a TorchWrapper instead of creating this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a template, I haven't added anything yet
Sharad24
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you install pre-commit? You can see the instructions in Contributing.md
|
This pull request introduces 5 alerts when merging 6f0563e into c3ef4d9 - view on LGTM.com new alerts:
|
|
This pull request introduces 7 alerts when merging 5061abe into 0fe4180 - view on LGTM.com new alerts:
|
Codecov Report
@@ Coverage Diff @@
## master #323 +/- ##
==========================================
- Coverage 90.77% 87.31% -3.47%
==========================================
Files 89 89
Lines 3772 4027 +255
==========================================
+ Hits 3424 3516 +92
- Misses 348 511 +163
|
.pre-commit-config.yaml
Outdated
|
|
||
| - repo: https://github.com/timothycrosley/isort | ||
| rev: 4.3.2 | ||
| rev: 5.5.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its very risky to change the versions here because of compatibility. Can you revert these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I change that I get some errors. Any other way to rectify it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you changed the isort.cfg file?
genrl/core/actor_critic.py
Outdated
| class Critic(MlpValue): | ||
| def __init__( | ||
| self, | ||
| state_dim: spaces.Space, | ||
| action_dim: spaces.Space, | ||
| fc_layers: Tuple = (32, 32), | ||
| val_type: str = "V", | ||
| **kwargs, | ||
| ): | ||
| super(Critic, self).__init__( | ||
| state_dim, action_dim, fc_layers, val_type, **kwargs | ||
| ) | ||
|
|
||
| self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu") | ||
|
|
||
| def forward(self, state): | ||
|
|
||
| state = self.model(state) | ||
|
|
||
| return state | ||
|
|
||
| def get_value(self, state): | ||
| # state = torch.FloatTensor(state).to(self.device) | ||
| value = self.forward(state) | ||
| return value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whats different in this Critic? You could just use the MlpValue directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add in the changes on the fly. I am just creating a template so that it can be used readily
…enrl into multiagentutils
Co-authored-by: Vedant Shah <[email protected]>
Co-authored-by: Vedant Shah <[email protected]>
Co-authored-by: Vedant Shah <[email protected]>
Co-authored-by: Vedant Shah <[email protected]>
Co-authored-by: Vedant Shah <[email protected]>
Co-authored-by: Vedant Shah <[email protected]>
No description provided.